<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <title>Title</title>
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
</head>
<body>
aaaaaaaaa
<script type="text/javascript">
    var text="a.b"


    function randomKeys(val) {
        var datas=[];
        var vkeys=val.split(".")
        datas.push(val);
        vkeys.forEach(key=>{

        })

    }

    var ab=randomKeys(text);

    console.log(ab.join(","))
</script>

</body>
</html>